package org.renhj;

import org.renhj.consumer.RpcConsumer;
import org.renhj.service.IUserService;

public class RpcConsumerBootstrap {

    public static void main(String[] args) throws Exception {

        RpcConsumer rpcConsumer = new RpcConsumer("UserService");
        IUserService userService = (IUserService) rpcConsumer.createProxy(IUserService.class);

        while (true) {
            userService.sayHello("from rpc consumer");
            Thread.sleep(2000);
        }

    }


}
